/*
 * NewJPanel.java
 *
 * Created on March 30, 2007, 8:27 AM
 */

package org.glossitope.container.wm.buffered.manage;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import org.jdesktop.swingx.JXBoxPanel;

/**
 *
 * @author  joshy
 */
public class ManageDeskletPanel extends JXBoxPanel {
    
    /** Creates new form NewJPanel */
    public ManageDeskletPanel() {
        initComponents();
        try {
            addButton.setIcon(new ImageIcon(ImageIO.read(getClass().getResource("/images/plus-normal.png"))));
            addButton.setRolloverIcon(new ImageIcon(ImageIO.read(getClass().getResource("/images/plus-rollover.png"))));
            addButton.setPressedIcon(new ImageIcon(ImageIO.read(getClass().getResource("/images/plus-pressed.png"))));
        } catch (IOException ex) {
            Logger.getLogger("global").log(Level.SEVERE, null, ex);
        }
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jTextArea1 = new javax.swing.JTextArea();
        addButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setLayout(new java.awt.GridBagLayout());

        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setLineWrap(true);
        jTextArea1.setRows(5);
        jTextArea1.setText("This is a description of one crazy cool desklet");
        jTextArea1.setWrapStyleWord(true);
        jTextArea1.setOpaque(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 10.0;
        gridBagConstraints.weighty = 10.0;
        add(jTextArea1, gridBagConstraints);

        addButton.setBorderPainted(false);
        addButton.setContentAreaFilled(false);
        addButton.setIconTextGap(0);
        addButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
        addButton.setMaximumSize(null);
        addButton.setMinimumSize(null);
        addButton.setOpaque(false);
        addButton.setPreferredSize(null);
        addButton.setRolloverEnabled(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        add(addButton, gridBagConstraints);

        jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 13));
        jLabel1.setText("Desklet Name");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        add(jLabel1, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents

    void setDeskletName(String string) {
        this.jLabel1.setText(string);
    }

    void setDeskletDescription(String string) {
        this.jTextArea1.setText(string);
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    javax.swing.JButton addButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration//GEN-END:variables
    
}
